package com.sogoodsoft.entity.project;

/***********************************************************************
 * Module:  Assessment.java
 * Author:  Administrator
 * Purpose: Defines the Class Assessment
 ***********************************************************************/

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.sogoodsoft.entity.IdEntity;
import com.sogoodsoft.entity.account.User;
import com.sogoodsoft.entity.app.Organization;
import com.sogoodsoft.entity.app.SysClass;
import com.sogoodsoft.entity.common.Maillog;

/** 项目申核 */
@Entity
@Table(name = "ASSESSMENT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Assessment extends IdEntity {

	/** 申核意见 */
	public java.lang.String comment;
	
	/** 申核意见 */
	public java.util.Date assessTime;

	public Organization organization;
	
	/** 项目与申核 */
	public Project project;
	
	/** 申核人 */
	public User user;
	
   /** 申核结果 */
	/** 申核结果1通过、2挂起、3、未通过、4、重新申核 */
   public SysClass sysClass;

   /** 发送的邮件通知 */
   public List<Maillog> maillogs;
   

   
	@Column(name="COMMENTS")
	public java.lang.String getComment() {
		return comment;
	}

	public void setComment(java.lang.String comment) {
		this.comment = comment;
	}


	@ManyToOne(optional=true)
	@JoinColumn(name="ORG_ID")
	public Organization getOrganization() {
		return organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	@ManyToOne(optional=true)
	@JoinColumn(name="PRJ_ID")
	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}

	@ManyToOne(optional=true)
	@JoinColumn(name="USER_ID")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@ManyToOne(optional=true)
	@JoinColumn(name="SYS_ID")
	public SysClass getSysClass() {
		return sysClass;
	}

	public void setSysClass(SysClass sysClass) {
		this.sysClass = sysClass;
	}

	@Column(name="ASSESS_TM")
	public java.util.Date getAssessTime() {
		return assessTime;
	}

	public void setAssessTime(java.util.Date assessTime) {
		this.assessTime = assessTime;
	}

	@OneToMany(mappedBy="assId",cascade=CascadeType.ALL)
	@OrderBy("id asc")
	public List<Maillog> getMaillogs() {
		return maillogs;
	}

	public void setMaillogs(List<Maillog> maillogs) {
		this.maillogs = maillogs;
	}


	
}